@echo off

REM 获取当前日期（格式：YYYYMMDD）
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "datetime=%%a"
set "log_date=%datetime:~0,4%%datetime:~4,2%%datetime:~6,2%"


set "PROJECT_DIR=D:/crypto_quant"
cd /d "%PROJECT_DIR%"
set PYTHONPATH=D:/crypto_quant;%PYTHONPATH%
echo "calc trading_data"
python ./TQR_Applications/factor_database/crypto/trading_data_update.py >> D:/crypto_quant/logs/trading_data_update_%log_date%.txt 2>&1
echo "calc onchain_data"
python ./TQR_Applications/factor_database/crypto/onchain_data_update.py >> D:/crypto_quant/logs/onchain_data_update_%log_date%.txt 2>&1
echo "calc alternative_data"
python ./TQR_Applications/factor_database/crypto/alternative_data_update.py >> D:/crypto_quant/logs/alternative_data_update_%log_date%.txt 2>&1
echo "update borrow interest"
python ./TQR_Applications/factor_database/crypto/borrow_interest_data_update.py >> D:/crypto_quant/logs/borrow_interest_data_update_%log_date%.txt 2>&1